home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / asgv1.zip / ASG.TXT < prev    next >
Text File  |  1994-02-06  |  12KB  |  237 lines

  1. ------------------------------------------------------------------------------
  2.         ASG - AutoStereoGram Producer By Justin J A Smith.
  3. ------------------------------------------------------------------------------
  4.     It is a good idea to print out this document to refer to later
  5.  
  6. File list:
  7.    You should have the following files; - unpacked from ASG.ZIP
  8.  
  9.     ASG.EXE                 - Main program file
  10.     ASG.INI                 - User definable variables file
  11.     ASG.TXT                 - This file
  12.     REGIFORM.ASG        - ASG Registration Form.
  13.     ASGMENU.ASG             - Menu module (R - use command line args.)
  14.     ASGPCX.ASG              - PCX viewer module (R)
  15.     ASGANIM.ASG             - Animation module (R)
  16.     ASGHELP.ASG             - Online help module (R)
  17.     SETTINGS.ASG            - Last picture settings
  18.     CUSTOM.ASG              - Bitmapped custom guide spot
  19.  
  20.     ASG.PCX                 - ASG logo (untranslated)
  21.     4OCLOCK.PCX        - Clock Picture (untranslated)
  22.     EXAMPLE.PCX             - Example output (translated and coloured)
  23.  
  24.     (R) = removable. If you find that you never use this module you can
  25.     safely delete it.
  26.  
  27. Overview:
  28.    ASG is a program which attempts to translate a 640x480x16 PCX bitmap file 
  29. into a black and white AutoStereoGram. You can therefore, draw a picture in 
  30. Deluxe paint (for instance), and turn it into your own personal AutoStereoGram.
  31. Please bear in mind that I taught myself C a few months ago, having no previous
  32. programming experience. I wrote this program in just a few weeks.
  33.  
  34. What is an AutoStereoGram?
  35.    It is a picture which first appears to be a screen full of random dots, but
  36. when viewed in the correct way can turn into an amazing 3 dimensional image. It
  37. works by arranging two slightly offset images made up of random dots together,
  38. one for each eye, so that when you look beyond the resultant image, you brain
  39. fuses the two images together giving an illusion of depth.
  40.    As a child (or a late developer) you may have done a similar trick, by
  41. holding you fingers together then looking beyond them. This results in a
  42. 'Phantom Finger' which seems to just float between the tips of you two fingers.
  43.  I have noticed that an illusion of depth can also be achieved by staring 
  44. beyond the dotty material which covers the ceiling of an old Ford Escort 
  45. estate, you can probably do the same trick on lots of other things, such as
  46. small regular patterned wallpaper etc, etc...
  47.  
  48. How Do I See These Pictures?
  49.  Try it now. with the following diagram. Look beyond it so that the points
  50. '-|-' join up in the middle to make a third '-|-'.
  51. Continue staring at for a while, to get used to the depth, then try to reach
  52. out and touch where you think the line should be. You should find that you can
  53. never quite reach because you finger strikes the screen or paper just short of
  54. the target.
  55.  
  56.     oooooooooooooooooooooooo-|-ooooooooo-|-oooooooooooooooooooooooo
  57.  
  58.    Start up ASG.EXE and produce an AutoStereoGram using one of the examples
  59. provided. (4OCLOCK.PCX, or ASG.PCX)
  60. First time users should just press 'S', at the menu screen, to start the
  61. default PCX file translating.
  62. Ensure that you switch on the Guide Spots (squares are good to start with)
  63. as these will help you to focus the correct distance away. Position yourself
  64. just in front of the screen and look at the picture as you would look at your
  65. reflection in a mirror, until the two Guide Spots transform into three. Next,
  66. stare hard at the center spot until in becomes sharply focused. You should now
  67. be able to see the 3D image, If not then keep on looking, It can take quite a
  68. long time for your brain to be tricked. Some people can see it immediatly,
  69. but approx. 10% can see nothing. If you can't see 3D films or television with
  70. the funny glasses then you probably won't be able to see these pictures.
  71.  
  72. Notes On PCX Files Produced By ASG.
  73.    ASG.EXE saves the image as a version 3 PCX, this should load into most art
  74. packages, authough if you experience difficulty you can convert the file into
  75. another supported format, using an image conversion package like Graphics
  76. Workshop. You may notice that the files produced by ASG are very large - larger
  77. than an uncompressed bitmap of the same size - this is due to the very random
  78. nature of the data, and to the relative ineffeciency of the compression scheme
  79. in the PCX file format.
  80.  
  81. Notes On Drawing Translatable Pictures.
  82.    Try to draw everything as thickly as possible, Thin lines and small patches
  83. of colour 'get lost' in the translation, or show up as interference patterns.
  84. Don't draw any detail very close to vertical edges as these will only be seen
  85. by one eye and so a few centimetres on either side of the picture is lost.
  86. Lots of detail in the picture results in lots of interference, for instance a
  87. scanned photograph with very diffuse detail just comes out as complete chunder
  88. when translated.
  89. Save the picture that you draw as a 16 colour 640x480 res. PCX file.
  90. Note. If you plan on using Windows Paintbrush to produce pictures, be warned!
  91. The default colours are all in the wrong order, so the depths on the final
  92. picture will not be as you may have expected. Experimentation is required to
  93. ensure correct results.
  94.  
  95. C Programmers - Using Custom Guide Spots.
  96.    The custom guide spots 'CUSTOM' are in the file CUSTOM.ASG it contains a 
  97. 12x25 pixel 16 colour _getimage() fragment. Create your own, and save them in
  98. a binary file of the same name and hey presto! custom guide spots. Only black
  99. and white colours will be saved in the final bitmap because the destination PCX
  100. file will always be monochrome, so only use colours 0, and 15.
  101.  
  102. ASG.INI - The user definable variable file
  103.    The settings are as follows:
  104.     
  105.     [settings]
  106.     StartingAnim 1                  Toggle Starting Animation (1=on, 0=off)
  107.     EyesValue 180                   Distance between images
  108.     GuideSpotPositionX 320          X position of Guide Spots 
  109.     GuideSpotPositionY 14           Y position of Guide Spots
  110.     Seed 1                          Seed Random number generator
  111.                     (1=seed, 0=no seed)
  112.  
  113. The settings must be in this order, don't put an '=' between the string and the
  114. number or the number will be ignored. You may change any of the numbers as
  115. shown above.
  116. After being switched off in ASG.INI you may delete the animation file
  117. ASGANIM.ASG otherwise the program will ask for it. 
  118.  The EyesValue sets the distance between the two images, a smaller value makes
  119. the images closer together so you don't have to focus as far back, If you have
  120. problems seeing an AutoStereoGram, then changing this value can often help. At
  121. 640x480, 400 is about as far as you can focus, but this value will go up to
  122. 32767, you may need to alter this value in order to translate an image that is
  123. larger than one screen (you would need to split the image up into several
  124. 640x480 screens, translate them and then stitch the resultant pictures together
  125. to make one large image)
  126. As of this version ASG does not support resolutions over 640x480 because my
  127. current monitor won't sync at anything higher. Future versions will support
  128. 800x600 and 1024x768.
  129.  The GuideSpotPositionX is the distance from the left of the screen at which to
  130. place the guide spots. 320 is at the centre of the screen, 160 and 480 are a
  131. quarter and three-quarters across the screen respectivly.
  132.  The GuideSpotPositionY is the distance from the top of the screen at which to
  133. place the guide spots. A value over 479 will be ignored, and guide spots will
  134. not be placed. The centre of the screen will be 240.
  135. If you set the Seed value to 0 the program will not re-seed the random number
  136. generator, and so the random patterns will be the same each time you run ASG
  137. with the same picture. This was included for animation purposes. You can often
  138. improve a dodgy looking AutoStereoGram just by re-translating it with seed
  139. switched to 1 (default value).
  140.  
  141. Command Line Arguments:
  142.    ASG.EXE can be run stand-alone with no menu, PCX viewer or online help, with
  143. command line arguments. These take the form:
  144.  
  145.     ASG.EXE [infile.PCX] [outfile.PCX]
  146.  
  147. Where [infile.PCX] is the name of the PCX file that you wish to translate, and
  148. [outfile.PCX] is the destination name for the translated file (WARNING- ASG 
  149. will overwrite any destination file if it already exists).
  150. NOTE: ASG.EXE executed from the command line uses the same guide spots settings
  151. as were set the last time you used the menu module.
  152.  
  153. PCX Viewer
  154.    ASG contains (within the PCX module ASGPCX.ASG) a PCX viewer. This correctly
  155. views any 640x480 16 colour PCX file, try it with EXAMPLE.PCX.
  156.  
  157. Summary of Commands in ASG
  158. Menu Commands
  159.  
  160. I or i  Input File name, pressing this will clear what's there and prompt the 
  161.     user for a PCX file.
  162. O or o  Output File name, see Input file name.
  163. V or v  View PCX, prompts the user for the name of a 640x480x16 PCX file to be 
  164.     viewed.
  165. F1      Online help.
  166. G or g  Guide Spots On/Off, toggles guide spots on/off
  167. T or t  Guide Spot Style, cycles through 3 different guide spot styles SQUARE,
  168.     CIRCLE & CUSTOM.
  169.  
  170. Other Commands
  171.  
  172. If while you are translating a PCX file into an AutoStereoGram, you press any 
  173. key, the current translation will be aborted, and you will return to the menu.
  174. (DOS if you use command line args.)
  175.  
  176. If you have used the menu, then after translation the program will pause to let
  177. you see the picture before saving it to disk, press any key to continue the
  178. save. or ESC to abort the save.
  179. If you used command line arguments to start ASG then after translation the
  180. program will immediatly save the picture and return to DOS. This is so that you
  181. can write a batch file to leave ASG proccesing multiple images unattended.
  182.  
  183. Colouring in AutoStereoGrams (like EXAMPLE.PCX)
  184.    After translation has been completed, you can colour in your AutoStereoGram.
  185. I shall explain how to do this with Deluxe Paint, but it can be done in this
  186. way with any Art package which allows you to stencil out colours, and use a
  187. gradient fill.
  188.  
  189.     1. Start up Dpaint in 640x480x16 mode. (DP.EXE k)
  190.  
  191.     2. Load your AutoStereoGram PCX file.
  192.  
  193.     3. Stencil out the black part of the picture.
  194.  
  195.     4. Create a nice flowing colour scheme using all the colours except
  196.        black. (see EXAMPLE.PCX)
  197.  
  198.     5. Make a gradient out of all the colours except black.
  199.  
  200.     6. After selecting the gradient, right-click on the filled rectangle
  201.        tool and select STRAIGHT in the linear fill section.
  202.  
  203.     7. Draw a rectangle which fills the entire screen and point the arrow
  204.        in the direction that you want the colour to flow in.
  205.  
  206.     8. You can now fine tune your palette to suit the picture you have
  207.        created, and save the final PCX file.
  208.  
  209. Registration of ASG.
  210.    ASG is shareware so if you think this program is useful please register.
  211. The registration fee is a minimum of £5, please send more if you think the
  212. program is worth it. For this you will receive a registered, personalised
  213. version of the most up to date ASG, and anything else that I have finished.
  214. Please send payment in cash, cheque, or postal order.
  215. Make cheques payable to Justin J A Smith.
  216.  
  217. To register print out and complete the registration form in REGIFORM.ASG or
  218. write to me with your full name and address, and also include a user name and
  219. company name for personalisation of your copy. 
  220.  
  221.     Please send your registration fee to:-
  222.  
  223.         Justin J A Smith
  224.         4 Sorrel close
  225.         Royston
  226.         Hertfordshire
  227.         SG8 9TL
  228.     
  229.     Please spread this program about, complete and unmutilated.
  230.  
  231. Enjoy - Justin J A Smith.
  232.  
  233. NOTE.
  234. I have noticed a small bug in the ASG animation. On some 386's the program will
  235. pause for several seconds before running the animation, this has something to
  236. do with my delay() function and there is nothing I can do about it. If it
  237. annoys you turn it off in ASG.INI (see above).